home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ray Dream Studio
/
Ray Dream Studio (CDRAYD1) (Ray Dream) (1995).iso
/
DREAMSDK.WIN
/
INCLUDE
/
I3DSHETR.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-11
|
6KB
|
135 lines
/* $Id: i3Dshetr.h 1.2 1995/09/11 01:11:06 YannPC Exp $ */
/*****************************************************************************\
* *
* I3DShEtr.h *
* I3DShCrossSection definition *
* I3DShExtrusion definition *
* *
* Copyright (c) 1995, Ray Dream, Inc. All rights reserved. *
* *
\*****************************************************************************/
#ifndef __I3DSHETR__
#define __I3DSHETR__
#ifndef __I3DSHOBJ__
#include "I3DShObj.h"
#endif
struct ExtrusionPB;
struct ExtrusionAutoPB;
//****** Globally Unique Ids **************************************************
DEFINE_GUID(IID_I3DShCrossSection, 0xB4E12D20L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
DEFINE_GUID(IID_I3DShExtrusion, 0xB6D730C0L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
//-- The following classes are available in Ray Dream Designer 3:
DEFINE_GUID(CLSID_StandardCrossSection, 0xB8A40180L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
DEFINE_GUID(CLSID_StandardExtrusion, 0xBC03A740L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
/*****************************************************************************\
* I3DShCrossSection *
* *
* I3DShCrossSection defines the cross-sections an Extrusion is made of. *
* *
* Pseudo "grammar" for building 2D curves:
* FLATSURFACE =
* BeginFlatSurface
* GROUP
* EndFlatSurface
*
* GROUP =
* BeginGroup
* GROUP | COMPOUND | PATH 1 or more times
* EndGroup
*
* COMPOUND =
* BeginCmpnd
* GROUP | COMPOUND | PATH 1 or more times
* EndCmpnd
*
* PATH =
* BeginPath
* LineTo | BezierTo 1 or more times
* EndPath
* *
\*****************************************************************************/
#undef INTERFACE
#define INTERFACE I3DShCrossSection
DECLARE_INTERFACE_(I3DShCrossSection, IUnknown) {
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
// I3DShCrossSection methods
STDMETHOD_(I3DShCrossSection*, Clone) (THIS) PURE;
//-- Geometry building calls (see grammar above)
STDMETHOD(BeginSection) (THIS) PURE; // Call this before building the section
STDMETHOD(EndSection) (THIS) PURE; // And this before when you are done
STDMETHOD(BeginGroup) (THIS) PURE;
STDMETHOD(EndGroup) (THIS) PURE;
STDMETHOD(BeginCmpnd) (THIS) PURE; // Use compounds to make holes
STDMETHOD(EndCmpnd) (THIS) PURE;
STDMETHOD(BeginPath) (THIS_ VECTOR2D* firstPoint) PURE;
STDMETHOD(LineTo) (THIS_ VECTOR2D* secondPoint) PURE;
STDMETHOD(BezierTo) (THIS_ VECTOR2D* secondPoint, VECTOR2D* thirdPoint, VECTOR2D* fourthPoint) PURE;
STDMETHOD(EndPath) (THIS) PURE;
//-- Utils.
STDMETHOD(Move) (THIS_ VECTOR2D* delta) PURE;
STDMETHOD(Transform) (THIS_ VECTOR2D* ti, VECTOR2D* tj, VECTOR2D* tt) PURE;
STDMETHOD(GetBBox) (THIS_ BOX2D* bbox) PURE;
};
/*****************************************************************************\
* I3DShExtrusion *
* *
* I3DShExtrusion is a generalized extrusion made out of multiple cross- *
* sections. *
* *
\*****************************************************************************/
#undef INTERFACE
#define INTERFACE I3DShExtrusion
DECLARE_INTERFACE_(I3DShExtrusion, I3DShObject) {
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
// I3DShObject methods
//-- Naming
STDMETHOD(SetName) (THIS_ char* name) PURE;
STDMETHOD(GetName) (THIS_ char* name) PURE;
//-- Geometry calls
STDMETHOD_(BOOLEAN, IsPatchBased) (THIS) PURE;
STDMETHOD(EnumPatches) (THIS_ EnumPatchesCallback callback, void* privData) PURE;
STDMETHOD(EnumFacets) (THIS_ EnumFacetsCallback callback, void* privData, NUM3D fidelity) PURE;
//-- Shading calls
STDMETHOD(SetSimpleShading) (THIS_ COLOR3D* color, NUM3D specularIntensity, NUM3D specularIndex, NUM3D reflection, NUM3D transparency) PURE;
STDMETHOD(SetPrimerShader) (THIS_ I3DShShader* name) PURE;
STDMETHOD_(ULONG, GetUVSpaceCount) (THIS) PURE;
STDMETHOD(GetUVSpace) (THIS_ ULONG uvSpaceID, UVSpaceInfo* uvSpaceInfo) PURE;
STDMETHOD(AddShadingShape) (THIS_ ShadingShape* shadingShape, ULONG uvSpaceID) PURE;
// I3DShExtrusion methods
//-- Geometry building
STDMETHOD(StartBuilding) (THIS_ BOOLEAN pipeline, BOOLEAN useEnvelopes, short envelopesFlags) PURE;
STDMETHOD(AddCrossSection) (THIS_ ExtrusionPB* pb) PURE;
STDMETHOD(AddAutoCrossSection) (THIS_ ExtrusionAutoPB* pb) PURE;
STDMETHOD(EndBuilding) (THIS) PURE;
//-- Misc.
STDMETHOD(CenterData) (THIS) PURE; // To do after EndBuilding(). Center data using regular bbox
STDMETHOD(CenterFacetData) (THIS) PURE; // To do after EndBuilding(). Center data using facets bbox. SLOW.
};
#endif